<?php
namespace app\common\model;

use think\Model;

/**   YSF
 *    工程人员账单 模型
 *    Date: 2018/9/21
 * Class EngineerBillModel
 * @package app\common\model
 */
class EngineerBillModel extends Model
{
    // 表名
    protected $name = 'engineer_bill';

    // 连表列表查询
    public function getJoinAll($where, $page, $pageSize, $join, $field, $order)
    {
        $result = $this->alias('a')
                ->where($where)
                ->field($field)
                ->join($join)
                ->page($page, $pageSize)
                ->order($order)
                ->select();
        return $result;
    }

    // 连表数量查询
    public function getJoinCount($where, $join)
    {
        $result = $this->alias('a')
                ->where($where)
                ->join($join)
                ->count();
        return $result;
    }

}